--Target Bar
local Head = MClass("Head")

--ctor 初始化UI init设置静态数据 setData设置动态数据
function Head:ctor()
    --self.root 默认为根节点
    self.icon = self:findChild("Panel/icon_img")
    self.teamBg = self:findChild("Panel/bg_team")
    self.enemyBg = self:findChild("Panel/bg_foe")
    self.enemyBgBoss = self:findChild("Panel/bg_foe_1")
    self.zhezhao = self:findChild("Panel/03Zhezhao")
    self.killImg = self:findChild("Panel/img_kill")
	self:init()
end

function Head:init()
   self.zhezhao:setVisible(false)
end

function Head:setData(icon,bEnemy,bKilled)
	self.icon:loadTexture(icon)
    self.enemyBg:setVisible(bEnemy)
    self.teamBg:setVisible(not bEnemy)
    self.killImg:setVisible(bKilled)
end

return Head